package com.pubinfo.passbook.common.service.master.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pubinfo.passbook.common.entity.TMdmProfitCenter;
import com.pubinfo.passbook.common.entity.TMdmSupplier;
import com.pubinfo.passbook.common.mapper.TMdmSupplierMapper;
import com.pubinfo.passbook.common.model.dto.MDM.MdmParam;
import com.pubinfo.passbook.common.model.dto.MDM.MdmSapSupplierParam;
import com.pubinfo.passbook.common.model.dto.MDM.SupplierCascadeBankParam;
import com.pubinfo.passbook.common.model.vo.mdm.SupplierCascadeBankVo;
import com.pubinfo.passbook.common.service.master.ITMdmSupplierService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author jobob
 * @since 2021-10-16
 */
@Service
@Slf4j
public class TMdmSupplierServiceImpl extends ServiceImpl<TMdmSupplierMapper, TMdmSupplier> implements ITMdmSupplierService {
  
  @Override
  public IPage<TMdmSupplier> listSupplier(MdmParam param) {
    IPage<TMdmSupplier> iPage = page(param.getPage("create_time"));
    return this.baseMapper.listSupplier(iPage, param);
  }
  
  @Override
  public IPage<TMdmSupplier> selectSupplier(MdmSapSupplierParam param) {
    IPage<TMdmSupplier> iPage = page(param.getPage("status"));
    return this.baseMapper.selectMdmSupplier(iPage, param);
  }
  
  @Override
  public IPage<SupplierCascadeBankVo> selectSupplierCascadeBank(SupplierCascadeBankParam param) {
    IPage<SupplierCascadeBankVo> iPage = page(param.getPage("name1"));
    return this.baseMapper.selectSupplierCascadeBank(iPage, param);
  }
}
